using Microsoft.AspNetCore.Mvc;
using Project_Schedule.Domain.BackGround.com.core.dto;
using Project_Schedule.Domain.BackGround.com.core.Interface;
using Project_Schedule.Domain.Request;

namespace Project_Schedule.Domain.BackGround.com.core.Controller;

[ApiController]
[Route("api/[controller]/[action]")]
public class BackgroundCreateUserController : ControllerBase
{
    private readonly IBackgroundCreateUser _backgroundCreate;

    public BackgroundCreateUserController(IBackgroundCreateUser backgroundCreateUser)
    {
        _backgroundCreate = backgroundCreateUser;
    }

    [HttpPost]
    public async Task<JRequest> CreateUser(BackgroundCreateUser dto)
    {
        return await _backgroundCreate.CreateUser(dto);
    }
}